﻿using Masuit.Tools.Core.Validator;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AJWPFAdmin.Core.HardwareSDKS.EQLED
{
    /// <summary>
    /// EQLED 每行配置模型
    /// </summary>
    public class EQLEDLineItemConfig : BindableBase
    {
        private int _lineNumber;
        /// <summary>
        /// 行序号
        /// </summary>
        public int LineNumber
        {
            get => _lineNumber; set => SetProperty(ref _lineNumber, value);
        }

        private EQLEDFontColor _fontColor;
        /// <summary>
        /// 字体颜色
        /// </summary>
        public EQLEDFontColor FontColor { get => _fontColor; set => SetProperty(ref _fontColor, value); }

        private int _fontSize;
        /// <summary>
        /// 字体大小
        /// </summary>
        [Display(Name = "字体大小")]
        [MinValue(0, ErrorMessage = "{0}至少为1且不能为负数")]
        public int FontSize
        {
            get { return _fontSize; }
            set { SetProperty(ref _fontSize, value); }
        }

        public EQLEDLineItemConfig()
        {
            FontColor = EQLEDFontColor.红色;
            FontSize = 12;
        }
    }
}
